Winnovative Software Logo

 Winnovative HTML to PDF Tools for .NET – Chromium and Classic Engines
 Convert HTML to PDF in .NET Core and Framework, Azure, Docker, Windows, Linux

 
Skip Navigation Links
 
In the code samples below you can see how the merge library is used to combine PDF documents, images, texts and HTML into a single PDF document.

C# Code Sample - PDF Merge

1:           PdfDocumentOptions pdfDocumentOptions = new PdfDocumentOptions();
2:  
3:           pdfDocumentOptions.PdfCompressionLevel = PDFCompressionLevel.Normal;
4:           pdfDocumentOptions.PdfPageSize =  PdfPageSize.A4;
5:           pdfDocumentOptions.PdfPageOrientation = PDFPageOrientation.Portrait;
6:  
7:           PDFMerge pdfMerge = new PDFMerge(pdfDocumentOptions);
8:  
9:           pdfMerge.AppendPDFFile(pdfFilePath);
10:          pdfMerge.AppendImageFile(imageFilePath);
11:          pdfMerge.AppendTextFile(textFilePath);
12:          pdfMerge.AppendEmptyPage();
13:          
14:  
15:          pdfMerge.SaveMergedPDFToFile(outFile);